//
//  UPLoanStateView.h
//  Uang Pasti
//
//  Created by 李永彬 on 2025/8/28.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSUInteger, UPLoanStateViewType) {
    UPLoanStateViewTypeEmpty,
    UPLoanStateViewTypeError
};

typedef void (^UPLoanStateViewRetryBlock)(void);

NS_ASSUME_NONNULL_BEGIN

@interface UPLoanStateView : UIView

@property (nonatomic, assign, readonly) UPLoanStateViewType loanStateViewType;
@property (nonatomic, strong) UIImageView *iconImageView;
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UIButton *retryButton;

- (void)updateWithType:(UPLoanStateViewType)type
                  icon:(NSString *)iconName
                 title:(NSString *)title
           buttonTitle:(NSString *)buttonTitle
            retryBlock:(UPLoanStateViewRetryBlock)retryBlock;

@end

NS_ASSUME_NONNULL_END
